package com.kongxx.wicketstudy.tutorial.user.web;

import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;

import com.kongxx.wicketstudy.tutorial.user.service.UserService;
import com.kongxx.wicketstudy.tutorial.user.service.impl.UserServiceImpl;

public class DeleteUserPanel extends Panel {
	public DeleteUserPanel(String id, final String entryId) {
		super(id);
		Form form = new Form("form") {
			protected void onSubmit() {
				final UserService userService = new UserServiceImpl();
				userService.delete(userService.find(entryId));
			};
		};
		add(form);
	}

}
